<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$JO["ringbacktone"]= JO( array( "EN" => "Ring Back Tone","VI"=>"Nhạc Chờ") );
$JO["vote"]= JO( array( "EN" => "Votes","VI"=>"Bình Chọn") );
$JO["lang"]= JO( array( "EN" => "Languages","VI"=>"Ngôn Ngữ") );
$JO["VI"]= JO( array( "EN" => "Vietnamese","VI"=>"Tiếng Việt") );
$JO["EN"]= JO( array( "EN" => "English","VI"=>"English") );
?>

<div class="JO_headmenui">
        <div id="menu">
            <ul class="menu">
                <li><a href="#" class="parent"><span>Jukeon</span></a>
                    <div style="z-index: 999;">
                        <ul>
                            <li><a href="#" class="parent"><span><?=$JO["lang"]?></span></a>
                                <div>
                                    <ul style="z-index: 999;">
                                        <li><a id="JO_langvi" href="#"><span><?=$JO["VI"]?></span></a></li>
                                        <li><a id="JO_langen" href="#"><span><?=$JO["EN"]?></span></a></li>
                                        
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                </li>
                <li><a href="?JO_unit=004_Ringbacktone" class="parent"><span><?=$JO["ringbacktone"]?></span></a>
                </li>
                <li><a href="#"><span>TV Show</span></a>
                    <div style="z-index: 999;">
                        <ul>
                            <li><a href="#"><span>Jukeon Show</span></a></li>
                            <li><a href="#"><span>KtoU</span></a></li>
                            <li><a href="#"><span>Kmusic</span></a></li>
                        </ul>
                    </div>
                </li>
                <li><a href="?JO_unit=007_KPopZone"><span>K-Pop Zone</span></a>
                    <div style="z-index: 999;">
                        <ul>
                            <li><a href="?JO_unit=008_KPopNews"><span>K-Pop News</span></a></li>
                            <li><a href="?JO_unit=008_KPopNews_Detail"><span>Artist in Information</span></a></li>
                            <li><a href="#"><span>Fan Corner</span></a></li>
                            <li><a href="?JO_unit=011_Comment"><span>Comment</span></a></li>
                        </ul>
                    </div>
                </li>
                <li class="last"><a href="?JO_unit=005_Rank_artist"><span><?=$JO["vote"]?></span></a></li>
                
            </ul>
        </div>

    </div>
<!--
    /////
    ////before login
    ///
-->
<?php 
    if(!isset($_SESSION["JO_account_id"])){

    ?>
	
		
		
	    <div class="JO_logini">
                <form
                id="frmlogin" name="frmlogin"
                style="border: 0px;"
		action	= "controller/JO_navigation.php"
		target	= "JO_integration_asynchronous"
		method	= "post"
                >
                    <input type="hidden" id="JO_query"		name="JO_query" 		value="account_login"		/>
                    <input type="hidden" id="JO_controller"	name="JO_controller"	value="index_controller"	/>
	        <input type="text"
	               id="JO_txtusernamei"
	               name="JO_txtusernamei"
	               value="Username"
	               onclick	= "this.value='';"
	               onblur	= "if(this.value=='') this.value='Tài Khoản';"
	         />
	        <input type="password"
	               id="JO_txtpasswordi"
	               name="JO_txtpasswordi"
	        />
	        <input type="submit"
	               id="JO_btnlogini"
	               class="input_buttoni"
	               value="Login"/>
	        <div id="JO_head_registeri">
	            <a href="?JO_unit=012_register">Register</a>
	        </div>
                </form>
	    </div>
    
<?php }?>
<!--
    /////
    ////after login
    ///
-->
<!--  -->
<script>
function show_top(){
    if(document.getElementById('JO_account_infi').style.display!='block'){JO_display( 'JO_head_video', 'block' );}
}

function show_menu_account(){
    if(document.getElementById('JO_account_infi').style.display!='block'){
        JO_display('JO_account_infi', 'block' );
        //JO_JQdisplay('#JO_account_infi', 'block' );
        //$('#JO_account_infi').hide(1000);
        document.getElementById('JO_acc_namei').parentNode.style.background='url(images/back.png)';
    }
    else{
        //$('#JO_account_infi').show(1000);
        JO_display('JO_account_infi', 'none' );
        document.getElementById('JO_acc_namei').parentNode.style.background='none';
    }
    //JO_display2( 'JO_account_infi')
    //alert(document.getElementById('JO_acc_namei').style.backgroundImage);
    //onclick="show_menu_account();"
}

</script>
<?php if(isset($_SESSION["JO_account_id"])){?>
<div class="JO_accounti">
    <div style="float: left;width: 248px !important;height:32px !important;"></div>
    <div id="menu_account" style="width:160px;">
        <ul class="menu_account">
            <li id="menu_accounti">
               <a href="javascript:void(0);" id="JO_acc_namei" class="parent"   ><span id="JO_acc_name_spani"><?=  JO_UNconvertHTMLentities($_SESSION["JO_account_name"]);?></span></a>
           </li>
        </ul>
        
    </div>
    <div id="JO_head_logouti">
    	<a href="#i"
           onclick="document.getElementById( 'JO_integration_asynchronous' ).src = 'controller/JO_navigation.php?JO_query=JO_logout';"
        >Logout</a>
        <!-- href="javascript:document.getElementById( 'JO_integration_asynchronous' ).src = 'controller/JO_navigation.php?JO_controller=index_controller&JO_query=account_logout';" -->
    </div>
    
</div>
<?php }?>
<!--<div style=";height: 2px !important;width: 960px;margin: 0px auto;position: relative;background: url(JO_images/hr.gif) repeat-x left bottom #202020;">

</div>-->
<div id="JO_head_logoi">
<!--    <a href="#"><img class="JO_logoi_img" src="JO_images/JO_03_logogram copy.png"/></a>-->
    <div id="JO_logoi_img">
        <img src="JO_images/JO_03_logogram copy.png" style="width: 240px;height: 64px;behavior: url(iepngfix.htc);"/>
    </div>
    <div id="JO_head_searchi">
        <input type="text" value="Search key" id="JO_head_txtsearchi"/>
        <input type="button" id="JO_head_btnsearchi" class="input_buttoni"
               value="Search"/>
    </div>
    <div id="JO_head_righti">
        <div id="JO_top_show" >
            <div id="JO_top_slideshow" class="JO_top_slideshow" onmouseover="show_top();" onmouseout="JO_display( 'JO_head_video', 'none' )">
                <div class="JO_top_item">
                    <div class="mar7i"></div>
                    <div class="JO_top_item_posi2">
<!--                        <div style="width: 48px;height: 48px;background: url(JO_images/num/1.png) no-repeat center; "></div>-->
                        1
                    </div>
                    <img class="JO_top_item_img2" src="http://image.bugsm.co.kr/album/images/60/2942/294235.jpg" />
                    <div class="JO_top_item_content2">
                        슈퍼주니어(Super Ju..)<br/>
                        Mr. Simple
                        <div class="JO_top_up">1</div>
                    </div>
                </div>
                <div class="JO_top_item">
                    <div class="mar7i"></div>
                    <div class="JO_top_item_posi2">
                        2
                    </div>
                    <img class="JO_top_item_img2" src="http://image.bugsm.co.kr/album/images/60/2956/295694.jpg"/>
                    <div class="JO_top_item_content2">
                        김범수 & 박정현<br/>
                        사람, 사랑
                        <div class="JO_top_up">1</div>
                    </div>
                </div>
                <div class="JO_top_item">
                    <div class="mar7i"></div>
                    <div class="JO_top_item_posi2">
                        3
                    </div>
                    <img class="JO_top_item_img2" src="http://image.bugsm.co.kr/album/images/60/2956/295694.jpg"/>
                    <div class="JO_top_item_content2">
                        2NE1 2nd Mini Album<br/>
                        UGLY
                        <div class="JO_top_down">2</div>
                    </div>
                </div>

            </div>
        </div>

    </div>

</div>
<div
    id			= "JO_head_video"
    class		= "JO_select JO_normal"
    style		= "
    right: 0px;
    top: 38px;
    width: 230px;
    display: none;
    position: absolute;
    margin: 0px ;
    padding: 0px 0px 8px 0px;
    border: 1px solid black;
    background-color: #1a1a1a;
    z-index: 99;
    "
    onmouseover	= "this.style.display = 'block';"
    onmouseout	= "this.style.display = 'none';"
    >
    <div class="mar8i"></div>
    <h1 class="h1i">Top Artist of August</h1>
    <div style="" class="content240i">
        <div class="JO_top_item2" >
            <div class="mar7i"></div>
            <div class="JO_top_item_posi2">
                    1
            </div>
            <img class="JO_top_item_img2" src="http://image.bugsm.co.kr/album/images/60/2942/294235.jpg" />
            <div class="mar8i"></div>
            <div class="JO_top_item_content2" >
                슈퍼주니어(Super Ju..)<br/>
                Mr. Simple
                <div class="JO_top_up">1</div>
            </div>
        </div>
        <div class="JO_top_item2">
            <div class="mar7i"></div>
            <div class="JO_top_item_posi2">
                2
            </div>
            <img class="JO_top_item_img2" src="http://image.bugsm.co.kr/album/images/60/2956/295694.jpg"/>
            <div class="mar8i"></div>
            <div class="JO_top_item_content2">
                김범수 & 박정현<br/>
                사람, 사랑
                <div class="JO_top_up">1</div>
            </div>
        </div>
        <div class="JO_top_item2">
            <div class="mar7i"></div>
            <div class="JO_top_item_posi2">
            3
            </div>
            <img class="JO_top_item_img2" src="http://image.bugsm.co.kr/album/images/60/2956/295694.jpg"/>
            <div class="mar8i"></div>
            <div class="JO_top_item_content2">
                2NE1 2nd Mini Album<br/>
                UGLY
                <div class="JO_top_down">2</div>
            </div>
        </div>
        <div class="JO_top_item_small">
            <div class="mar7i"></div>
            <div class="JO_top_item_posi_small">
            4
            </div>
            <div class="mar8i"></div>
            <div class="JO_top_item_content_small">
                2NE1 2nd Mini Album<br/>
                UGLY
                <div class="JO_top_unchanged"></div>
            </div>
        </div>
        <div class="JO_top_item_small">
            <div class="mar7i"></div>
            <div class="JO_top_item_posi_small">
            5
            </div>
            <div class="mar8i"></div>
            <div class="JO_top_item_content_small">
                2NE1 2nd Mini Album<br/>
                UGLY
                <div class="JO_top_unchanged"></div>
            </div>
        </div>
        <div class="JO_top_item_small">
            <div class="mar7i"></div>
            <div class="JO_top_item_posi_small">
            6
            </div>
            <div class="mar8i"></div>
            <div class="JO_top_item_content_small">
                2NE1 2nd Mini Album<br/>
                UGLY
                <div class="JO_top_unchanged"></div>
            </div>
        </div>
    </div>


</div>

<div id="JO_account_infi" style="
     "   >
    <ul style="" >
        <li style=""><a href="#" class="parent" style=""><span style="">My Favorite</span></a>
<!--           <div><ul><li><a href="#"><span>level 3</span></a></li></ul></div>-->
       </li>
       <li><a href="#"><span>Update My Account</span></a></li>
       <li><a href="?SO_unit=06_topic"><span>Service Operator</span></a></li>
       <li><a href="#"><span>Content Owner</span></a></li>
       <li class="last"><a id="JO_debug" href="#"><span><?=isset($_SESSION[ "JO_account_debug" ])?($_SESSION[ "JO_account_debug" ]?"Debug Off":"Debug On"):"Debug On"?></span></a></li>
   </ul>
</div>
<script type="text/javascript" src="https://raw.github.com/cowboy/jquery-outside-events/v1.1/jquery.ba-outside-events.js"
></script>
<script>
    $("#JO_acc_namei").click(
        function(){
            if($('#JO_account_infi').css('display')!='block'){
                JO_JQdisplay('#JO_account_infi', 'block' );
                //$('#JO_account_infi').show(1000);
                $(this.parentNode).css('background','url(images/back.png)');
            }
            else{
                //$('#JO_account_infi').hide(1000);
                JO_JQdisplay('#JO_account_infi', 'none' );
                $(this.parentNode).css('background','none');
            }
        }
    );
//    $('#JO_account_infi').mouseout(function(){
//        $(this).hide();
//    });
    $('#JO_debug').click(
        function (){
            $('#JO_integration_asynchronous').attr("src","controller/JO_navigation.php?JO_query=JO_debug");
        }
    );
    $('#JO_langvi').click(
        function (){
            $('#JO_integration_asynchronous').attr("src","controller/JO_navigation.php?JO_lang=VI");
        }
    );
    $('#JO_langen').click(
        function (){
            $('#JO_integration_asynchronous').attr("src","controller/JO_navigation.php?JO_lang=EN");
        }
    );
    $("#JO_account_infi").bind( "clickoutside", function(event){
        //alert(target.attr('id'));
        target = $(event.target);
        if( target.attr('id') ? target.attr('id'):""=="JO_acc_namei" || target.attr('id') ? target.attr('id'):""=="JO_acc_name_spani"){
            
        }else{
            $("#JO_account_infi").hide(500);
            //$("#menu_accounti").css('background',"none");
            $("#JO_acc_namei").parent("li").css('background',"none");
            
        }
    });
</script>